#ifndef IPMETHOD_H
#define IPMETHOD_H

#include <QWSInputMethod>
#include "keyboard.h"
#include <QWidget>
#include <QPoint>

/*  #include <QWidget>  这个头文件是我自己加的，因为想获取屏幕的分辨率,
 *  QDesktopWidget *pDesk = QApplication::desktop();
 *  p_keyboard->move((pDesk->width() - w.width()) / 2, (pDesk->height() - w.height()) / 2);
 */

class INPUTMethod : public QWSInputMethod
{
    Q_OBJECT

public:
    INPUTMethod();
    ~INPUTMethod();
    void updateHandler(int);

    //在这里处理鼠标移动事件
    void  mouseMoveEvent(QMouseEvent *e);
    void  moveEvent(QMoveEvent * event);

    QRect GetMethodRect();
private:
        keyboard *p_keyboard;
        QString content;

        //*****************************

        //**********************************

signals:
        void DelContent();
public slots:
        void ShowKeyBoard(QObject *obj);
        void HideKeyBoard();
private slots:
        void PreeditContent(char);
        void ConfirmContent();
        void BackspaceContent();
        void Escape();

};

#endif // IPMETHOD_H


